package wjh.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import wjh.pojo.Doctor;

import java.util.List;

@Repository
public interface wyDoctorMapper {

    List<Doctor> like(@Param("likename")  String likename);
    @Insert("insert into doctor values (null,#{name},#{password},#{photo},#{age},#{sex},#{duty},#{department},#{phone},#{introduction},null,#{register_fee},#{department_id})")
    void addDoctor(Doctor doctor);
    @Select("delete from doctor where id=#{value}")
    void deleteDoctorByid(String ids);
    @Select("select *from doctor")
    List<Doctor> findAll();
    @Select("select * from doctor where id=#{value}")
    Doctor findDoctorById(int id);

    void updateDoctor(Doctor doctor);
}
